package com.lch.webdemo.service.impl;

import com.lch.webdemo.bean.po.LeaveMsgPo;
import com.lch.webdemo.dao.LeaveMsgDao;
import com.lch.webdemo.service.ILeaveMsgService;
import com.lch.webdemo.util.DateUtil;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: liuchenhui
 * @create: 2019-02-24 23:57
 **/
@Service
public class LeaveMsgServiceImpl implements ILeaveMsgService {

    @Resource
    LeaveMsgDao leaveMsgDao;

    @Override
    public void addMsg(String auth, String msg, String title) {
        LeaveMsgPo leaveMsgPo = new LeaveMsgPo();
        leaveMsgPo.setAuth(auth);
        leaveMsgPo.setContext(msg);
        leaveMsgPo.setTitle(title);
        leaveMsgPo.setAddtime(DateUtil.getUnixTimestamp());
        leaveMsgDao.insert(leaveMsgPo);
    }
}
